package com.gao.frame.study.shop.user.module.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

@Data
@TableName(value = "customer_balance_log")
public class CustomerBalanceLog {
    /**
     * 余额日志id
     */
     @TableId(value = "balance_id", type = IdType.AUTO)
    private Integer balanceId;

    /**
     * 用户ID
     */
    @TableField(value = "customer_id")
    private Integer customerId;

    /**
     * 记录来源:1订单,2退货单
     */
    @TableField(value = "source")
    private Byte source;

    /**
     * 相关单据ID
     */
    @TableField(value = "source_sn")
    private Integer sourceSn;

    /**
     * 记录生成时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 变动金额
     */
    @TableField(value = "amount")
    private BigDecimal amount;

    public static final String COL_CUSTOMER_ID = "customer_id";

    public static final String COL_SOURCE = "source";

    public static final String COL_SOURCE_SN = "source_sn";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_AMOUNT = "amount";
}